﻿package mortal.game.view.market.buyAndQiugou
{
    import com.mui.controls.*;
    import com.mui.display.*;
    import flash.display.*;
    import flash.events.*;
    import flash.text.*;
    import mortal.common.*;
    import mortal.common.global.*;
    import mortal.component.gconst.*;
    import mortal.game.events.*;
    import mortal.game.mvc.*;
    import mortal.game.resource.*;
    import mortal.game.view.common.*;
    import mortal.mvc.core.*;

    public class MktCatogeryRenderer extends GCellRenderer
    {
        private var _txtName:GTextFiled;
        private var _txtStatus:GTextFiled;
        private var _line:ScaleBitmap;

        public function MktCatogeryRenderer()
        {
            return;
        }// end function

        override protected function initSkin() : void
        {
            var _loc_1:* = new Bitmap();
            this.setStyle("downSkin", ResourceConst.getScaleBitmap(ImagesConst.taskItemSelected));
            this.setStyle("overSkin", ResourceConst.getScaleBitmap(ImagesConst.taskItemSelected));
            this.setStyle("upSkin", _loc_1);
            this.setStyle("selectedDownSkin", ResourceConst.getScaleBitmap(ImagesConst.taskItemSelected));
            this.setStyle("selectedOverSkin", ResourceConst.getScaleBitmap(ImagesConst.taskItemSelected));
            this.setStyle("selectedUpSkin", ResourceConst.getScaleBitmap(ImagesConst.taskItemSelected));
            return;
        }// end function

        override public function set data(param1:Object) : void
        {
            super.data = param1;
            this._txtName.text = param1.label;
            return;
        }// end function

        override protected function createDisposedChildrenImpl() : void
        {
            super.createDisposedChildrenImpl();
            var _loc_1:* = GlobalStyle.textFormatPutong;
            _loc_1.align = TextFormatAlign.CENTER;
            this._txtName = UIFactory.gTextField("", 12, 1, 155, 20, this, _loc_1);
            _loc_1.align = TextFormatAlign.RIGHT;
            this._txtStatus = UIFactory.gTextField("", 12, 1, 160, 20, this, _loc_1);
            this._line = UIFactory.bg(0, 20, 180, 1, this, ImagesConst.SplitLine);
            this.configEventListener(MouseEvent.CLICK, this.clickMeHandler);
            return;
        }// end function

        private function clickMeHandler(event:MouseEvent) : void
        {
            Dispatcher.dispatchEvent(new DataEvent(EventName.MarketClickType, data));
            return;
        }// end function

        override protected function disposeImpl(param1:Boolean = true) : void
        {
            super.disposeImpl(param1);
            this._txtName.dispose(param1);
            this._txtName = null;
            this._line.dispose(param1);
            this._line = null;
            this._txtStatus.dispose(param1);
            this._txtStatus = null;
            return;
        }// end function

        override public function set label(param1:String) : void
        {
            return;
        }// end function

    }
}
